<script setup lang="ts">
import {ref} from "vue";
import {typeUserChat} from "@/store/dataType";
import {findAllUserChatByAccountName} from "@/Network/chatApi";
import {anaDataSplitWord} from "@/utils/anaData";


async function getAnaDataCount(){
  let chatData = ref<typeUserChat[]>()
  let res = await findAllUserChatByAccountName(localStorage.getItem("accountName"))
  chatData.value = res.data
  let resAna = anaDataSplitWord(chatData.value, "question")
  console.log(resAna)
}

</script>

<template>
 <button @click="getAnaDataCount">点击触发getAnaDataCount方法</button>
</template>

<style scoped>

</style>